package com.gsmmodem;

import java.io.IOException;
import java.net.Socket;
import java.net.UnknownHostException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;

public class StartMsgClient extends HttpServlet {
	public void init() throws ServletException {

		System.out.println("servlet 被调用!");
		Socket socket = null;
		try {
			socket = new Socket("127.0.0.1", 5000);
			MsgSendClient client = new MsgSendClient(socket);
			client.start();
		} catch (UnknownHostException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}finally{
			//System.exit(0);
		}

	}
}
